#testdata row: class, param1, param2
#errorRate row: [c1,c2,c3,c4] (error rates in respective classes)
function results = performTest(testdata,M,S,apriori=[0.25,0.25,0.25,0.25])
    mistakes=[0,0,0,0];
    occurencies=[0,0,0,0];
    for i=1:size(testdata,1)
        occurencies(1,testdata(i,1))+=1;
        answer=guessClass(testdata(i,2:end),M,S,apriori);
        if(answer!=testdata(i,1))
            mistakes(1,testdata(i,1))+=1;
        endif
    end
results=[occurencies;mistakes];
end
